<!doctype html>
<html>
<head>
<title>订单详情</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta content="telephone=no" name="format-detection" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta id="vieport" name="viewport" content="width=640, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5">
<script src="js/jquery-1.8.0.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<script type="text/javascript" src="./js/home-jx.js?version=0310"></script>
<link rel="stylesheet" type="text/css" href="./css/home.css?version=0310" />
<script src="js/jquery.cookie.js"></script>
<script src="js/jquery.getparm.js"></script>
<link rel="stylesheet" type="text/css" href="common.css">
<script type="text/javascript" src="js/common.js?version=0310"></script>
<script language="javascript">
var dingdanId = $.getUrlParam("OI_ID");
var xiaoxiId = $.getUrlParam("MSG_ID");

var fid = $.cookie("NP_INFO_ID");
var Ukey = $.cookie("U_KEY");
var order_no = $.getUrlParam("order_no");
$(function () {
	initData();

})
function initData() {
	$.natureajax({
		url : jsonserver + "msg_getMsgDetail.do?callback=?",
		data : "MSG_ID="+(xiaoxiId==null?"":xiaoxiId)+"&MSG_NATURE_FID=" + fid + "&ukey=" + Ukey + "&MSG_ORDER_FID=" + (dingdanId==null?"":dingdanId),
		dataType : "jsonp",
		success : function (data) {
			if (data[0].result == 1) {
				var dataResult = data[1].data[0];
				var tdArray = $(".an");
				$.each(tdArray, function (i, items) {
					if (i + 1 == dataResult.oi_step) {
						$(items).removeClass("an").addClass("dianliang");
					}
				});
				
				$("#firstmonthfee").text(dataResult.tgbe_firstmonthfee);
				$("#selectdiscount").text(dataResult.tgbe_selectdiscount);
				
				$("#recNo").text(dataResult.oi_id);
				$("#recTime").text(dataResult.oi_in_date);
				$("#recStatus").text(dataResult.oi_step_desc);
				$("#operTime").text(formatDate(dataResult.oi_predeal_date));
				$("#sendTime").text(dataResult.bs_send_date);
				
				$("#custName").text(dataResult.cui_name);
				$("#custPhone").text(dataResult.cui_contacttel);
				$("#backStatus").text(dataResult.tips);
				$("#accountName").text(dataResult.np_detail_name);
				$("#bankName").text(dataResult.bank_info);
				$("#bankNo").text(dataResult.np_detail_bankno);

				$("#payNo").text(dataResult.msg_order_no);
				$("#busiType").text(dataResult.oi_business_type_name);
				$("#getNo").text(dataResult.tgbe_dealno);
				$("#phoneNo").text(dataResult.oi_deal_phoneno);
				if("1"==dataResult.oi_step){
					$("#_ps").hide();
					$("#_khxx").show();
				}else if("2"==dataResult.oi_step){
					$("#_ps").hide();
					$("#_khxx").show();
				}else if("3"==dataResult.oi_step){
					$("#_khxx").show();
					$("#recStatus").text("办理成功");
					$("#sendStatus").text(dataResult.oi_step_desc);
				}else if("4"==dataResult.oi_step){
					if("0"==dataResult.oi_status){
					}
					if("0"==dataResult.banktype){
						$("#_tips").show();
					}else{
						$("#_zhxx").show();
					}
					$("#tips").text(dataResult.tips);
					$("#_khxx").show();
					$("#recStatus").text("办理成功");
					$("#sendStatus").text("派送成功");
					$("#_fy").show();
				}
			} else {
				$("#list").append("<div style='text-align:center;'>没有返佣信息...</div>");
			}
		},
		error : function () {
			alert("e")
		}
	});
}
function formatDate(thisDate) {
	var dateArray = thisDate.split("/");
	var resultDate = dateArray[0] + "年" + dateArray[1] * 1 + "月" + dateArray[2].substring(0, 2) + "日";
	return resultDate;
}
		</script>
<style>
.fangkuang {
	font-size: 27px;
	color: #ffffff;
	background-color: #00ADE1;
	border-style: solid;
	border-radius: 7px;
	border-color: #00ADE1;
	margin-left: 10%;
	width: 130px;
	text-align: center;
}
.shang {
	text-align: center;
	margin-top: 6px;
	color: #ffffff;
	font-size: 25px;
}
.xia {
	text-align: center;
	margin-top: 15px;
	color: #268ABE;
	font-size: 20px;
}
.dianliang {
	background: url('img/xiangdan_liang.png');
	height: 83px;
	width: 100px;
}
.an {
	background: url('img/xiangdan_an.png');
	height: 83px;
	width: 100px;
}
.jiantou1 {
	background: url('img/xiangdan_wjiantou1.png')no-repeat;
	height: 45px;
	width: 45px;
}
.jiantou2 {
	background: url('img/xiangdan_wjiantou2.png')no-repeat;
	height: 45px;
	width: 45px;
}
.changyong {
	margin-left: 10%;
	font-size: 25px;
	font-family: '微软雅黑';
}
.changyong2 {
	margin-left: 12%;
	font-size: 25px;
	font-family: '微软雅黑';
}
.nowstatus{
	color:#009933;
}

</style>
</head>
<body onResize="resize()">
<div id="bodyobj" class="bigimg" >
  <div id="header" style="width:100%">
    <div id="_title" class="header"> 
      <!--页面头部开始-->
      <table width="100%" height="100%" class="headerTal">
        <tr>
          <td class="menuTd">返回</td>
          <td class="titleName" style="width:60%">订单详情页</td>
          <td width="18%" align="right"><span class="titleMessage" onClick="showMsg()"></span></td>
        </tr>
      </table>
      <!--页面头部结束--> 
    </div>
    <div id="home" style="width:100%;">
      <div style="margin-top:20px;"> 
        <!--页面主体开始-->
        <div style="margin-left:2%;width:96%;" >
          <div style="margin-left:2%;width:96%;" id="headerStep">
            <table style="height:83px;width:100%;">
              <tr>
                <td style="height:83px;width:14%;">
                	<div class="an">
                    <div class="shang">推荐</div>
                    <div class="xia">1</div>
                  </div></td >
                <td style="height:83px;width:14%;"><div class="jiantou1"></div></td>
                <td style="height:83px;width:14%;"><div class="an">
                    <div class="shang">办理</div>
                    <div class="xia">2</div>
                  </div></td>
                <td style="height:83px;width:14%;"><div class="jiantou2"></div></td>
                <td style="height:83px;width:14%;"><div class="an">
                    <div class="shang">派送</div>
                    <div class="xia">3</div>
                  </div></td>
                <td style="height:83px;width:14%;"><div class="jiantou1"></div></td>
                <td style="height:83px;width:14%;"><div class="an">
                    <div class="shang">返佣</div>
                    <div class="xia">4</div>
                  </div></td>
              </tr>
            </table>
          </div>
          <div style="height:27px;;width:100%;margin-top:10px;position:relative;">
            <table width="100%"  cellpadding="0" cellspacing="0" border="0">
              <tr style="height:27px" >
                <td style="width:15px;background:url('img/line_left.png')" ></td>
                <td style="background:url('img/line_conter.png')"></td>
                <td style="width:15px;background:url('img/line_right.png')"></td>
              </tr>
              <tr>
                <td style="width:1px;background:url('img/yy_left.png')  repeat-y right top" ></td>
                <td>
                	<div> <span style="margin-left:10%;;font-size:27px;font-family:'微软雅黑';">&nbsp;&nbsp;推荐号:</span><span id="recNo" style="margin-left:10%;font-size:26px;color:blue;font-family:'微软雅黑';"></span> </div>
                 
                  <div> <span class="changyong">推荐时间:</span><span class="changyong" id="recTime"></span> </div>
                  <div> <span class="changyong">办理状态:</span><span class="changyong" id="recStatus"></span> </div>
                  <div id="_tj"><div><span class="changyong">办理时间:</span><span class="changyong" id="operTime"></span> </div></div>
                  <div id="_ps">
				  <div><span class="changyong">派送状态:</span><span style="margin-left:10%;font-size:25px;font-family:'微软雅黑';" id="sendStatus"></span> </div>
                  <div><span class="changyong">派送时间:</span><span class="changyong" id="sendTime"></span> </div>
                  </div>
				  <div style="display:none" id="_fy">
					  <div> <span class="changyong">返佣状态:</span><span style="margin-left:10%;color:#009933;font-size:25px;font-family:'微软雅黑';" id="backStatus"> </span> </div>
					  <div id="_tips" style="display:none"> <span style="margin-left:12%;color:red;font-size:25px;font-family:'微软雅黑';">&nbsp;&nbsp;&nbsp;&nbsp;提示:</span><span id="tips" style="margin-left:5%;color:red;font-size:25px;font-family:'微软雅黑';"></span> </div>
				  </div>
                  <br>
				  <div id="_khxx" style="display:none">
                  <div style="margin-left:10%;width:80%;height:5px;background:url('img/line.png')"></div>
                  <br>
                  <div class="fangkuang">客户信息</div>
                   <br>
                  <div> <span class="changyong2">客户姓名:</span><span class="changyong" id="custName"></span> </div>
                  <div> <span class="changyong2">客户电话:</span><span class="changyong" id="custPhone"></span> </div>
                  <div> <span class="changyong2">优惠活动:</span><span class="changyong" id="selectdiscount"></span> </div>
                  <div> <span class="changyong2">首月资费:</span><span class="changyong" id="firstmonthfee"></span> </div>
                  <br>
				  </div>
				  <div id="_zhxx" style="display:none">
                  <div style="margin-left:10%;width:80%;height:5px;background:url('img/line.png')"></div>
                  <br>
                  <div class="fangkuang">账户信息</div>
                   <br>
                  <div> <span class="changyong2">*账号姓名:</span><span class="changyong" id="accountName"></span> </div>
                  <div> <span class="changyong2">*选择银行:</span><span class="changyong" id="bankName"></span> </div>
                  <div> <span class="changyong2">*银行账号:</span><span class="changyong" id="bankNo"></span> </div>
                  <div> <span class="changyong2">*支付宝账号:</span><span class="changyong" id="payNo" style="margin-left:8%;"></span> </div>
                   <br>
				   </div>
                  <div style="margin-left:10%;width:80%;height:5px;background:url('img/line.png')"></div>
                  <br>
                  <div class="fangkuang">业务信息</div>
                   <br>
                  <div> <span class="changyong2">业务类型:</span><span class="changyong" id="busiType"></span> </div>
                  <div> <span class="changyong2">手&nbsp;&nbsp;机&nbsp;&nbsp;号:</span><span class="changyong" id="phoneNo"></span> </div>
                  <div> <span class="changyong2">受&nbsp;&nbsp;理&nbsp;&nbsp;号:</span><span style="margin-left:10%;font-size:25px;font-family:'微软雅黑';" id="getNo"></span> </div></td>
                <td style="width:1px;background:url('img/yy_right.png') repeat-y"></td>
              </tr>
              <tr>
                <td style="height:10px;" ></td>
                <td style="height:10px;background:url('img/icon_bowei.png')" ></td>
                <td style="height:10px;" ></td>
              </tr>
            </table>
            <div style="height:20px;"></div>
          </div>
        </div>
      </div>
      <!--页面主体结束--> 
    </div>
  </div>
</div>
</div>
</body>
</html>